package com;

public final class Time {
    public static double calculateCost(final int seconds) {

        int minutes = (int) Math.ceil(seconds / 60.0);
        if (minutes == 0) {
            minutes = 1; // 处理0秒的情况，计为1分钟
        }
        if (minutes <= 20) {
            return minutes * 0.05;
        } else {
            return 1.00 + (minutes - 20) * 0.10;
        }
    }
    private Time() {
        throw new UnsupportedOperationException("工具类不应被实例化");
    }
}
